<?php

namespace app\common\model;

use app\common\model\BaseModel as BaseModel;
use app\common\traits\TimeCacheTrait;

/**
 * Class AccessLog
 * @package app\common\model
 * @property int $id
 * @property string $pagePath
 * @property int $ip
 * @property string $date
 * @property string $pf
 * @property string $chain
 * @property int $promotionGroupId
 * @property int $updated
 * @property int $created
 * @link https://www.kancloud.cn/manual/thinkphp6_0/1037579
 * @link https://www.kancloud.cn/manual/think-orm/1257998
 * @link https://www.kancloud.cn/thinkphp/master-database-and-model/265551
 */
class AccessLog extends BaseModel
{
    use TimeCacheTrait;

    // 客户端类型 h5 H5落地页  wx 微信小程序 tt 抖音小程序
    // wxsub微信公众号
    const PF_H5 = 'h5';
    const PF_WX = 'wx';
    const PF_TT = 'tt';
    const PF_WX_SUB = 'wxsub';


    //用户端-首页
    const PAGE_MEMBER_SOUYE = 'pages/user/user';
    //用户端-律师页
    const PAGE_MEMBER_LVSHI = 'pages/user/user/lvshi';

    //用户端-打官司-第1步
    const PAGE_MEMBER_LAWSUIT_STEP1 = 'pages/user/daguansi/step1/step1';
    //用户端-咨询页面（极速咨询）
    const PAGE_MEMBER_CHAT = 'pages/user/chat/chat';
    //用户端-找律师
    const PAGE_MEMBER_ZHAOLVSHI = 'pages/user/user/lvshi';
    //用户端-电话咨询
    const PAGE_MEMBER_CONSULTING_PHONE = 'pages/user/dinahuazixun2/dinahuazixun2';
    //用户端-律师主页
    const PAGE_MEMBER_LVSHIZHUYE = 'pages/lawyer/zhuye1/zhuye1';
    //用户端-热门咨询详情
    const PAGE_MEMBER_REMENZIXUNXIANGQING = 'pages/user/shouye/zixunxiangqing/zixunxiangqing';
    //用户端-律师认证页
    const PAGE_MEMBER_LVSHIRENZHENG = 'pages/lawyer/ruzhu2/ruzhu2';
    //用户端-公益分享
    const PAGE_MEMBER_SHARE = 'pages/user/fenxiang/fenxiang';

        // 用户注册：g.pvuv("/h5/ruser", "h5")
        // 律师注册：g.pvuv("/h5/rlawyer", "h5")
        // 抖音落地页：g.pvuv("/h5/root", "h5")
        // 第一步：g.pvuv("/h5/lawsuit/step1", "/h5/root")
        // 第二步：g.pvuv("/h5/lawsuit/step2", "/h5/lawsuit/step1")
        // 第三步：g.pvuv("/h5/lawsuit/step3", "/h5/lawsuit/step2")

    //h5落地页-打官司-入口页
    const PAGE_H5_LAWSUIT_ENTRY1 = '/h5/root';
    const PAGE_H5_LAWSUIT_ENTRY2 = '/h5/ruser';

    //短信H5 未付款页面
    const PAGE_H5_SMS1 = '/h5/sms1';
    //短信H5 律师已回复页面
    const PAGE_H5_SMS2 = '/h5/sms2';

    // h5落地页1-入口A
    const PAGE_H5_LANDING1_ENTRY1 = '/h5/fim_entry';
    // h5落地页1-入口B
    const PAGE_H5_LANDING1_ENTRY2 = '/h5/fim_entry2';
    // h5落地页1-订单待支付-入口
    const PAGE_H5_SMS3 = '/h5/sms3';



    protected $name = 'AccessLog';


    /**
     * 1对1
     * @return \think\model\relation\HasOne
     */
    //    public function one(){
    //        return $this->hasOne( Test1::class, 'Test1表中的键', 'AccessLog表中的键');
    //    }

    /**
     * 1对多
     * @return \think\model\relation\HasMany
     */
    //    public function many(){
    //        return $this->hasMany( Test1::class, 'Test1表中的键', 'AccessLog表中的键');
    //    }

    /**
     * 多对多
     * @return \think\model\relation\BelongsToMany
     */
    //    public function belongs(){
    //        return $this->belongsToMany( Test1::class, '中间表', '中间表中Test1的键', '中间表中AccessLog的键');
    //    }
}
